#ifndef expression_h
#define expression_h

#include "Type.hpp"
#include "Value.hpp"
#include "CodeContainer.hpp"


class Expression {
	private:
		Type * type;
		Value * value;
		bool calculated;
		bool adressable;
		int identTempResult;
		CodeContainer * code;



	public:
		/**
		* Constructs an empty expression. Properties will be set to invalid values (NULL/false/-1)
		*/
		Expression();

		/**
		* Constructs an empty expression for a variable. Properties will be set to invalid values (NULL/false/-1)
		*/
		Expression(Type * type, int identValue);

		/**
		* Constructs an new expression.
		*/
		Expression(Type* type, Value* value, bool calculated, bool adressable, int ident, CodeContainer* code);

		virtual ~Expression();

		Expression * clone();

		//design bof, setters inutiles en fait mais + simple et + clair coté ExpressionsManager
		void setType(Type* type);
		void setValue(Value* value);
		void setCalculated(bool calculated);
		void setAdressable(bool adressable);
		void setIdentTempResult(int ident);
		void setCode(CodeContainer* code);


		Type* getType();
		Value* getValue();
		bool isCalculated();
		bool isAdressable();
		int getIdentTempResult();
		CodeContainer* getCode();

		void show();
};

#endif
